package com.frame.common.enums;

import com.frame.common.enums.base.BaseEnum;

/**
 * @author Flying
 * @date 2018-08-16 17:52:35
 **/
public enum SmsType implements BaseEnum {

    /**
     * 注册&&登陆 使用的前缀
     */
    LOGIN_REGISTER_SMS(1,"login_register_sms_","C端登陆注册"),

    BIND_LOGIN_REGISTER_SMS(2,"bind_login_register_sms","C端绑定注册登陆"),

    BIND_MERCHANT_SMS(3,"bind_merchant_sms","B端绑定登陆"),

    ACCOUNT_PAY_RESET_PASSWORD(4,"account_pay_reset_password","修改账户支付密码"),

    MERCHANT_LOGIN_SMS(5,"merchant_login_sms","B端登陆"),

    ;

    private final Integer value;

    private final String description;

    private final String key;

    SmsType(Integer value,String key,String description){
        this.value = value;
        this.description = description;
        this.key = key;
    }


    public static SmsType valueOf(Integer value) {
        for (SmsType item : values()) {
            if (item.getValue() .equals(value)) {
                return item;
            }
        }
        return null;
    }


    @Override
    public Integer getValue() {
        return value;
    }

    @Override
    public String getDescription() {
        return description;
    }

    public String getKey() {
        return key;
    }

    public SmsType get(Integer value) {
        return SmsType.valueOf(value);
    }


    @Override
    public String toString() {
        return String.valueOf(this.value);
    }



}
